
require './resources/lua/viewports/deferred'

class 'test_state' (sun.game_state)

function test_state:__init( )
	sun.game_state.__init( self )
	-- print( "test_state begun" )
	
	self.viewport = deferred_viewport( )
end

--[[
sun game_states use the "Run and Return" pattern.
This just means that if you wan't to change game states, you return the new (and completely initialised) state from step.
If you wan't to continue with a state, return self.
]]--
function test_state:step( delta_time )
	-- print( "test_state:step( " .. tostring( delta_time.seconds ) .. " )" )
	return self
end

function test_state:pre_draw( step_fraction, stack )
	-- print( "test_state:pre_draw( " .. tostring( step_fraction ) .. " )" )
	stack:push( self.viewport )
end
